package edu.purdue.cs.ds.vss;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.ArrayList;

/**
 * Contains the information necessary to verify a subshare
 * @author jwallrab
 *
 */
public class VerifyMessage implements Serializable{

	/**
	 * For the compiler
	 */
	private static final long serialVersionUID = 5091684033210022038L;
	private VerifiableShare share;
	private int index;
	public String destination;
	public String source;
	private byte[] signature = null;
	private boolean sigValid = false;
	
	
	public VerifyMessage(VerifiableShare shareparam){
		
		
		share = shareparam;
	}
	
	public ArrayList<BigInteger> getA(){
		return share.getA();
	}
	
	public BigInteger getA0(){
		return share.getA0();
	}
	
	public ArrayList<BigInteger> getLambda(){
		return share.getShare().getLambda();
	}
	
	public BigInteger getLambda0(){
		return share.getShare().getLambda().get(0);
	}	
	
	public int getIndex(){
		return index;
	}
	
	public VerifiableShare getShare(){
		return share;
	}
	
	public void setSignature(byte[] s){
		signature = s;
	}
	
	public byte[] getSignature(){
		return signature;
	}
	
	public void setValidSig(boolean b){
		sigValid = b;
	}
	
	public boolean getSigValid(){
		return sigValid;
	}
}
